import { AppRedisComponent } from './redis/redis';
import { NgModule } from '@angular/core';
import { Routes, RouterModule } from '@angular/router';
import { environment } from '../../environments/environment';
import { LayoutDefaultComponent } from '../layout/default.component';
import { DashboardComponent } from './dashboard/dashboard.component';
import { AppMysqlComponent } from './mysql/mysql';
import { AppAccountComponent } from './account/account';

const routes: Routes = [
    {
        path: '',
        component: LayoutDefaultComponent,
        children: [
            { path: '', redirectTo: 'dashboard', pathMatch: 'full' },
            { path: 'dashboard', component: DashboardComponent },
            { path: 'mysql', component: AppMysqlComponent },
            { path: 'redis', component: AppRedisComponent },
            { path: 'account', component: AppAccountComponent },
        ]
    }
];

@NgModule({
    imports: [RouterModule.forRoot(routes, { useHash: environment.useHash })],
    exports: [RouterModule]
})
export class RouteRoutingModule { }
